package team.seekers.catering.order.entity.dao;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import team.seekers.catering.common.enums.OrderPackEnum;
import team.seekers.catering.common.enums.OrderStatusEnum;
import team.seekers.catering.common.enums.OrderTypeEnum;
import team.seekers.catering.common.enums.TimeTypeEnum;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author hbc
 * @since 2022-02-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "COrder对象", description = "订单表")
@TableName("c_order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @TableField("p_id")
    private String productId;

    @TableField("u_id")
    private String userId;

    @ApiModelProperty(value = "线下叫号单号")
    private String showId;

    @ApiModelProperty(value = "线上订单状态")
    @JsonValue
    private OrderStatusEnum status;

    @ApiModelProperty(value = "根据身体数据得出的量档位")
    private Integer amount;

    @ApiModelProperty(value = "用户预约时间段")
    @JsonValue
    private TimeTypeEnum timeType;

    @ApiModelProperty(value = "订单是否支付")
    @JsonValue
    private OrderTypeEnum isPay;

    @ApiModelProperty(value = "是否打包")
    @JsonValue
    private OrderPackEnum isPack;

    @ApiModelProperty(value = "订单应付价钱")
    private BigDecimal price;

    @ApiModelProperty(value = "口味标签")
    private String label;

    private Date endDate;

    @TableLogic
    private Integer isDelete;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


}
